package com.jams.goodox.activity.login;

import android.content.Intent;
import android.support.v4.content.ContextCompat;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.ImageView;
import android.widget.RadioGroup;
import android.widget.TextView;

import com.jams.goodox.BaseActivity;
import com.jams.goodox.R;
import com.jams.goodox.SePref;
import com.jams.goodox.utils.StatusBarCompat;
import com.jams.goodox.utils.StyleUtil;
import com.jams.goodox.utils.Utils;
import com.jams.goodox.widget.EditTextWithDel;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * Created by HP on 2018/5/8.
 * 用户角色选择
 */

public class RoleChooseActivity extends BaseActivity {
    @Bind(R.id.radiogroup)
    RadioGroup radiogroup;

    @Bind(R.id.submmit)
    TextView submmit;

    private int userIdentity = 1;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_role_choose;
    }

    @Override
    protected void init() {
        StatusBarCompat.compat(this, ContextCompat.getColor(this, R.color.main_theme));//沉侵式头部
        StyleUtil.titleBackKey(this, "角色选择");

        radiogroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(RadioGroup group, int checkedId) {
                if(checkedId == R.id.radio1){
                    //userIdentity = "教师";
                    userIdentity = 2;
                }else {
                    //userIdentity = "家长";
                    userIdentity = 1;
                }
            }
        });

    }


    @OnClick({R.id.ler_back,  R.id.submmit})
    public void onClick(View view) {
        switch (view.getId()) {

            case R.id.submmit:
                Intent intent = new Intent(RoleChooseActivity.this,RoleInfoUploadActivity.class);
                intent.putExtra("type",userIdentity);
                startActivity(intent);
                finish();
                break;
        }
    }
}
